// 用户相关接口
import { http } from "./request";

export const addCartApi = (p: any) => http.post("order.Cart/add", p);
export const cartListApi = () => http.get("order.Cart/lists", {});
export const delCartApi = (p: any) => http.post("order.Cart/delete", p);
export const editCartApi = (p: any) => http.post("order.Cart/editNum", p);
export const getCartNumApi = () => http.get("order.Cart/getCartNum");
export const buyApi = (p: any) => http.post("order.Order/buy", p);
export const cartBuyApi = (p: any) => http.post("order.Order/cart", p);
export const orderDetailApi = (p: any) => http.get("user.Order/detail", p);

export const cancelOrderApi = (p: any) => http.post("user.Order/cancel", p);

export const payOrderApi = (p: any) => http.post("user.Order/pay", p);

export const orderListApi = (p: any) => http.get("user.Order/lists", p);
export const cconfirmOrderApi = (p: any) => http.post("user.Order/receipt", p);
export const payStatusApi = (order_id: number) =>
  http.get("user.Order/payStatus", { order_id: order_id });
export const addPointOrderApi = (p: any) =>
  http.post("order.Order/pointBuy", p);
